package com.psdi.element;

import com.psdi.Main;
import com.psdi.manager.GameLoader;
import com.psdi.window.GameJFrame;

import java.awt.*;

public class End extends ElementObject{
    private static int height = GameJFrame.GAME_HEIGHT;
    private static int width = GameJFrame.GAME_WIDTH;
    public End(){
        transform = new Transform();
        tag=Tag.END;
    }

    @Override
    public void show(Graphics g) {
        super.show(g);
    }

    public ElementObject creat(boolean victory){
        this.transform = new Transform(new Position(0,0),new Rotation(),new Size(width,height));
        this.tag=Tag.END;
        if(!Main.Start)
        {
            this.image = GameLoader.iconMap2.get(tag.toString()).get(2);
            return this;
        }
        if(victory){
            this.image = GameLoader.iconMap2.get(tag.toString()).get(0);
        }
        else {
            this.image = GameLoader.iconMap2.get(tag.toString()).get(1);
        }
        return this;
    }
}
